{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 96,
   "id": "240ecaec",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8ba57af1",
   "metadata": {},
   "source": [
    "## 导入数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "f1396ace",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Channel</th>\n",
       "      <th>Region</th>\n",
       "      <th>Fresh</th>\n",
       "      <th>Milk</th>\n",
       "      <th>Grocery</th>\n",
       "      <th>Frozen</th>\n",
       "      <th>Detergents_Paper</th>\n",
       "      <th>Delicassen</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>12669</td>\n",
       "      <td>9656</td>\n",
       "      <td>7561</td>\n",
       "      <td>214</td>\n",
       "      <td>2674</td>\n",
       "      <td>1338</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>7057</td>\n",
       "      <td>9810</td>\n",
       "      <td>9568</td>\n",
       "      <td>1762</td>\n",
       "      <td>3293</td>\n",
       "      <td>1776</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>6353</td>\n",
       "      <td>8808</td>\n",
       "      <td>7684</td>\n",
       "      <td>2405</td>\n",
       "      <td>3516</td>\n",
       "      <td>7844</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>13265</td>\n",
       "      <td>1196</td>\n",
       "      <td>4221</td>\n",
       "      <td>6404</td>\n",
       "      <td>507</td>\n",
       "      <td>1788</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>22615</td>\n",
       "      <td>5410</td>\n",
       "      <td>7198</td>\n",
       "      <td>3915</td>\n",
       "      <td>1777</td>\n",
       "      <td>5185</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Channel  Region  Fresh  Milk  Grocery  Frozen  Detergents_Paper  Delicassen\n",
       "0        2       3  12669  9656     7561     214              2674        1338\n",
       "1        2       3   7057  9810     9568    1762              3293        1776\n",
       "2        2       3   6353  8808     7684    2405              3516        7844\n",
       "3        1       3  13265  1196     4221    6404               507        1788\n",
       "4        2       3  22615  5410     7198    3915              1777        5185"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "goods=pd.read_csv('C:/Users/Mr.Xiao/Desktop/Wholesale customers data.csv')\n",
    "goods.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "c0f843da",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x1b4903c9f48>"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD4CAYAAADiry33AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYX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CXpMYZ9JLUOINekhr3/wFSCSArKSPS4wAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "X=goods.iloc[:,0]\n",
    "Y=goods.iloc[:,1]\n",
    "plt.scatter(X,Y,c='red',marker='o',s=15)  #初步数据分布"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "794c306e",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Channel             int64\n",
       "Region              int64\n",
       "Fresh               int64\n",
       "Milk                int64\n",
       "Grocery             int64\n",
       "Frozen              int64\n",
       "Detergents_Paper    int64\n",
       "Delicassen          int64\n",
       "dtype: object"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "goods.dtypes"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ae002776",
   "metadata": {},
   "source": [
    "## 分组"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "97f71bb4",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Channel</th>\n",
       "      <th>Region</th>\n",
       "      <th>Fresh</th>\n",
       "      <th>Milk</th>\n",
       "      <th>Grocery</th>\n",
       "      <th>Frozen</th>\n",
       "      <th>Detergents_Paper</th>\n",
       "      <th>Delicassen</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>440.000000</td>\n",
       "      <td>440.000000</td>\n",
       "      <td>440.000000</td>\n",
       "      <td>440.000000</td>\n",
       "      <td>440.000000</td>\n",
       "      <td>440.000000</td>\n",
       "      <td>440.000000</td>\n",
       "      <td>440.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>1.322727</td>\n",
       "      <td>2.543182</td>\n",
       "      <td>12000.297727</td>\n",
       "      <td>5796.265909</td>\n",
       "      <td>7951.277273</td>\n",
       "      <td>3071.931818</td>\n",
       "      <td>2881.493182</td>\n",
       "      <td>1524.870455</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>0.468052</td>\n",
       "      <td>0.774272</td>\n",
       "      <td>12647.328865</td>\n",
       "      <td>7380.377175</td>\n",
       "      <td>9503.162829</td>\n",
       "      <td>4854.673333</td>\n",
       "      <td>4767.854448</td>\n",
       "      <td>2820.105937</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>55.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>25.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>3.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3127.750000</td>\n",
       "      <td>1533.000000</td>\n",
       "      <td>2153.000000</td>\n",
       "      <td>742.250000</td>\n",
       "      <td>256.750000</td>\n",
       "      <td>408.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>8504.000000</td>\n",
       "      <td>3627.000000</td>\n",
       "      <td>4755.500000</td>\n",
       "      <td>1526.000000</td>\n",
       "      <td>816.500000</td>\n",
       "      <td>965.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>16933.750000</td>\n",
       "      <td>7190.250000</td>\n",
       "      <td>10655.750000</td>\n",
       "      <td>3554.250000</td>\n",
       "      <td>3922.000000</td>\n",
       "      <td>1820.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>112151.000000</td>\n",
       "      <td>73498.000000</td>\n",
       "      <td>92780.000000</td>\n",
       "      <td>60869.000000</td>\n",
       "      <td>40827.000000</td>\n",
       "      <td>47943.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          Channel      Region          Fresh          Milk       Grocery  \\\n",
       "count  440.000000  440.000000     440.000000    440.000000    440.000000   \n",
       "mean     1.322727    2.543182   12000.297727   5796.265909   7951.277273   \n",
       "std      0.468052    0.774272   12647.328865   7380.377175   9503.162829   \n",
       "min      1.000000    1.000000       3.000000     55.000000      3.000000   \n",
       "25%      1.000000    2.000000    3127.750000   1533.000000   2153.000000   \n",
       "50%      1.000000    3.000000    8504.000000   3627.000000   4755.500000   \n",
       "75%      2.000000    3.000000   16933.750000   7190.250000  10655.750000   \n",
       "max      2.000000    3.000000  112151.000000  73498.000000  92780.000000   \n",
       "\n",
       "             Frozen  Detergents_Paper    Delicassen  \n",
       "count    440.000000        440.000000    440.000000  \n",
       "mean    3071.931818       2881.493182   1524.870455  \n",
       "std     4854.673333       4767.854448   2820.105937  \n",
       "min       25.000000          3.000000      3.000000  \n",
       "25%      742.250000        256.750000    408.250000  \n",
       "50%     1526.000000        816.500000    965.500000  \n",
       "75%     3554.250000       3922.000000   1820.250000  \n",
       "max    60869.000000      40827.000000  47943.000000  "
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "goods.describe() #同时能验证数据的完整性"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c0b4bd66",
   "metadata": {},
   "source": [
    "## 标准化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "1fb12cad",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.preprocessing import Normalizer\n",
    "nor=Normalizer().fit(goods)\n",
    "goods_=pd.DataFrame(nor.transform(goods))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "0bc002c5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x1b49049d648>"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAD4CAYAAAAdIcpQAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAWUUlEQVR4nO3df5Bd5X3f8fdXu0YYi8U1bGUb4Ug2omOBbZms+WGKxjaTIpKM1SZoIk+boY0yTG1o0ybTDMQz9lQznTH2TPC0A+OhRQ0hHusHkIkmJaFJMRU1WLDCwqzAImuwB1F3kYGASAJ4xbd/nLPh6rJ7n6v9ce9Z9v2a2bnnnPuc537vSruffc5z7jmRmUiS1MmyfhcgSWo+w0KSVGRYSJKKDAtJUpFhIUkqGux3ASfijDPOyNWrV/e7DElaNPbv3//TzByeaz+LKixWr17N6Ohov8uQpEUjIn48H/14GEqSVGRYSJKKDAtJUpFhIUkqMiwkSUWGhSSpyLCQpKaamIANG2BoqHqcmOhbKYaFJDXV5s3w4INw9Gj1uHlz30oxLCSpqQ4cgMnJanlyslrvE8NCkppq/XoYrC+0MThYrfeJYSFJTbV7N1x8MZx6avW4e3ffSllU14aSpCVl5UrYu7ffVQCOL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wH/AdhVj1KmtRjC4kTuAU50dw/wmbY/D7y77mOm1+pXbdR9fBkYBn67Q129ru3jwNnAeET8CDglqrsmNqU+qP7Suqte/mPgo02oLSKGgY9l5r56+07gkz2urZOJiHhf3df7gI6HKvpQHxHxL4FfBv55HWhNqO1DVHMHj9Y/E6uARyLivQ2pD+qfifrI9kPAG1QXI5xepwmNJnxRpd9TVN/4qUmfc9vaXMPxkz676uVzOX7S5ymqSaQZ+wR2c/wE9xcaVNtvAg8A72za962t324muHv9vfsK8Bv18qeAh5tQW739p8A59f5bgTt7WVvLfqt56yTo1zh+gvurvf53LdS3keq2zcP9+D/Xqba2fn9EeYK719+7f001jwfVIalnqD+oPW19pW9wE76ozgJ6kmqG/4v1tm3AZ+vlk6l+yY9TTfx+sGXfL9b7HQKu6NRnvf2DdR/jdZ/LG1TbZL3tQP31pabU1va6xbDow/fu3cD/AB4DHqT6a74ptf2zuq5Hgfta++phbd8CfgL8jOovzq319tOB/wX8FdWZM+/p07/rTPWNU/2SO1B/faMptbW97o8ohEUfvncnAX8EjAGPAJ/pVJuX+5AkFS2GOQtJUp8ZFpKkIsNCklRkWEiSigwLSVKRYSFJKjIsJElF/x+GvMVdJoG2kQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "X_=goods_.iloc[:,0]\n",
    "Y_=goods_.iloc[:,1]\n",
    "plt.scatter(X_,Y_,c='red',marker='o',s=15)  #标准化后数据分布"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b945872f",
   "metadata": {},
   "source": [
    "## 轮廓系数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "1ea2e004",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.cluster import KMeans \n",
    "from sklearn.metrics import silhouette_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "id": "0b986890",
   "metadata": {},
   "outputs": [],
   "source": [
    "score=[]\n",
    "\n",
    "for i in range(3,30):\n",
    "    cluster=KMeans(n_clusters=i,random_state=5).fit(feature)\n",
    "#     print(cluster.cluster_centers_)\n",
    "    score.append(silhouette_score(feature,cluster.labels_))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "id": "5ded2071",
   "metadata": {},
   "outputs": [],
   "source": [
    "feature=goods_.iloc[:,2:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "id": "6ba3fede",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "      <th>6</th>\n",
       "      <th>7</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.708333</td>\n",
       "      <td>0.539874</td>\n",
       "      <td>0.422741</td>\n",
       "      <td>0.011965</td>\n",
       "      <td>0.149505</td>\n",
       "      <td>0.074809</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.442198</td>\n",
       "      <td>0.614704</td>\n",
       "      <td>0.599540</td>\n",
       "      <td>0.110409</td>\n",
       "      <td>0.206342</td>\n",
       "      <td>0.111286</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.396552</td>\n",
       "      <td>0.549792</td>\n",
       "      <td>0.479632</td>\n",
       "      <td>0.150119</td>\n",
       "      <td>0.219467</td>\n",
       "      <td>0.489619</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.856837</td>\n",
       "      <td>0.077254</td>\n",
       "      <td>0.272650</td>\n",
       "      <td>0.413659</td>\n",
       "      <td>0.032749</td>\n",
       "      <td>0.115494</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.895416</td>\n",
       "      <td>0.214203</td>\n",
       "      <td>0.284997</td>\n",
       "      <td>0.155010</td>\n",
       "      <td>0.070358</td>\n",
       "      <td>0.205294</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>435</th>\n",
       "      <td>0.776890</td>\n",
       "      <td>0.315197</td>\n",
       "      <td>0.419191</td>\n",
       "      <td>0.343549</td>\n",
       "      <td>0.004760</td>\n",
       "      <td>0.057646</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>436</th>\n",
       "      <td>0.990872</td>\n",
       "      <td>0.036146</td>\n",
       "      <td>0.019298</td>\n",
       "      <td>0.113919</td>\n",
       "      <td>0.002349</td>\n",
       "      <td>0.059258</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>437</th>\n",
       "      <td>0.364462</td>\n",
       "      <td>0.388465</td>\n",
       "      <td>0.758545</td>\n",
       "      <td>0.010961</td>\n",
       "      <td>0.372237</td>\n",
       "      <td>0.046827</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>438</th>\n",
       "      <td>0.937737</td>\n",
       "      <td>0.180530</td>\n",
       "      <td>0.203404</td>\n",
       "      <td>0.094594</td>\n",
       "      <td>0.015310</td>\n",
       "      <td>0.193653</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>439</th>\n",
       "      <td>0.672296</td>\n",
       "      <td>0.409601</td>\n",
       "      <td>0.605476</td>\n",
       "      <td>0.015680</td>\n",
       "      <td>0.115065</td>\n",
       "      <td>0.012544</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>440 rows × 6 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            2         3         4         5         6         7\n",
       "0    0.708333  0.539874  0.422741  0.011965  0.149505  0.074809\n",
       "1    0.442198  0.614704  0.599540  0.110409  0.206342  0.111286\n",
       "2    0.396552  0.549792  0.479632  0.150119  0.219467  0.489619\n",
       "3    0.856837  0.077254  0.272650  0.413659  0.032749  0.115494\n",
       "4    0.895416  0.214203  0.284997  0.155010  0.070358  0.205294\n",
       "..        ...       ...       ...       ...       ...       ...\n",
       "435  0.776890  0.315197  0.419191  0.343549  0.004760  0.057646\n",
       "436  0.990872  0.036146  0.019298  0.113919  0.002349  0.059258\n",
       "437  0.364462  0.388465  0.758545  0.010961  0.372237  0.046827\n",
       "438  0.937737  0.180530  0.203404  0.094594  0.015310  0.193653\n",
       "439  0.672296  0.409601  0.605476  0.015680  0.115065  0.012544\n",
       "\n",
       "[440 rows x 6 columns]"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "feature"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "id": "fbad6652",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.lines.Line2D at 0x1b492371fc8>"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD4CAYAAAAAczaOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAsdUlEQVR4nO3deXwV5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]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(range(3,30),score)\n",
    "plt.axvline(pd.DataFrame(score).idxmax()[0]+3,ls=':') #簇数为3的时候轮廓系数最优"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "413f77f7",
   "metadata": {},
   "source": [
    "## 可视化分析"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "id": "596a2932",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0.60876894, 0.24578457, 0.27755345, 0.57978261, 0.05422715,\n",
       "        0.11258711],\n",
       "       [0.26255296, 0.48868873, 0.67784831, 0.09595589, 0.26615252,\n",
       "        0.10056062],\n",
       "       [0.91525593, 0.16363071, 0.22379331, 0.13895318, 0.04881771,\n",
       "        0.06795594]])"
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cluster_best=KMeans(n_clusters=3,random_state=5).fit(feature)\n",
    "cluster_best.cluster_centers_  #三类质心"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "id": "b419c776",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.legend.Legend at 0x1b493607448>"
      ]
     },
     "execution_count": 79,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAOcAAADnCAYAAADl9EEgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAYM0lEQVR4nO3de5xVZb3H8c++zAwIuAEBuc8CFJWbKXghUDJNpB1dMNSj1k6z8nReHqO0s7rYWXU6trtYVsfXOZVYlqYmcExb5uuQJWVGKmUuLgJetsgwMwww7OEyt73Xc/5YQ40IzB5mz36etffv/XrtF1bMfr724suz9l7Pep6I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ExzGtNsAr4D/AwnG+otKnWRchaDkxhIsHfuR4F3ABGtefRRwJMEl69P4GTlD1cfSDmLzUlMIdi76CPAOL1hSsYjuDf8AE52m+4w5ULK2V+cRAxYSDCjJoHRegMV3TbgAeD+rl33RZFJOUsheALmHOA9wGLgbVrzHJ9O4E/Ab4DVwJ/lsrV/STl1cBLjCWbV84DzCZYMmraUUgEbCYr4G2ANTrYUJ4OJLlJOEziJwcAcgrKeB8wALEq34KGV4HPj3wgWn/8NeFHuR+ol5TRVsHRwAjAZmNL162RgBHDiYa9BR3mXDuAgwUPLDUBd12tHt3/eBryMk83317+KOD5SznIQFPnQYoh816tTChduUk4hDGXalxBCiC5STiEMJeUUwlBSTiEMJeUUwlBSTiEMJeUUwlBSTiEMJeUUwlBSTiEMJeUUwlBSTiEMJeUUwlBSTiEMJeUUwlBSTiEMJeUUwlBSTiEMJeUUwlBSTiEMJeUUwlBSTiEMJeUUwlBSTiEMJeUUwlBSTiEMJeUUwlD/D+yfov9nCqCcAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "num=pd.value_counts(cluster_best.labels_)\n",
    "_=plt.pie(num)\n",
    "plt.legend(num.index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 118,
   "id": "14e72847",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD1CAYAAABA+A6aAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAdW0lEQVR4nO3deXRV5bnH8e+TAIYCokBQS4DEFhkzEEIAI4NQQJAGAZFJhjogClilcMGKTGovVtTlKjiAA+htMQgFuYIFAaFCKaNhCEQZGgVsmWQehIT3/pGQGzAhJ+Ekh2x+n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qUD/czs7cCUFDhaQxcR8Qjd5SIi4hEKdBERj1Cgi4h4hAJdRMQjFOgiIh7xf7I26kwuza2QAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "\n",
    "v1 = cluster_best.cluster_centers_\n",
    "\n",
    "df = pd.DataFrame(v1, columns=goods.iloc[:,2:].columns.values.tolist())\n",
    "\n",
    "# 绘制图形\n",
    "df.plot(kind='bar')\n",
    "\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "482ebda3",
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "id": "1fddbe91",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['Fresh', 'Milk', 'Grocery', 'Frozen', 'Detergents_Paper', 'Delicassen']"
      ]
     },
     "execution_count": 89,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "goods.iloc[:,2:].columns.values.tolist()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "id": "0c4ceea6",
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "feature_center=cluster_best.cluster_centers_.tolist()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9d4223d2",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "43ba5c51",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a351c001",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
